#include <stdio.h> // 包含 scanf 的定义
namespace SV_TAINTED_CALL_GLOBAL {
	namespace bad {
#define MAX 10
		int gVar = 0;
		int getTaintedData()
		{
			int i;
			scanf("%d", &i);
			return i;
		}
		void foo()
		{
			int t = getTaintedData();
			bar(t);
		}
		void bar(int t)
		{
			gVar = t;
		}
	}




	namespace good {


#define MAX 10
		int gVar = 0;
		int getTaintedData()
		{
			int i;
			scanf("%d", &i);
			return i;
		}
		void foo()
		{
			int t = getTaintedData();
			if (t < MAX) {
				// value validated
				bar(t);
			}
		}
		void bar(int t)
		{
			gVar = t;
		}
	}
}